import 'package:get/get.dart';

import '../modules/cast/bindings/cast_binding.dart';
import '../modules/cast/chooseList/bindings/choose_list_binding.dart';
import '../modules/cast/chooseList/views/choose_list_view.dart';
import '../modules/cast/views/cast_view.dart';
import '../modules/cast_progress/bindings/cast_progress_binding.dart';
import '../modules/cast_progress/views/cast_progress_view.dart';
import '../modules/cast_record/bindings/cast_record_binding.dart';
import '../modules/cast_record/cast_record_detail/bindings/cast_record_detail_binding.dart';
import '../modules/cast_record/cast_record_detail/views/cast_record_detail_view.dart';
import '../modules/cast_record/views/cast_record_view.dart';
import '../modules/device/add_device/bindings/add_device_binding.dart';
import '../modules/device/add_device/views/add_device_view.dart';
import '../modules/device/bindings/device_binding.dart';
import '../modules/device/views/device_view.dart';
import '../modules/edit_info/bindings/edit_info_binding.dart';
import '../modules/edit_info/views/edit_info_view.dart';
import '../modules/home/bindings/home_binding.dart';
import '../modules/home/views/home_view.dart';
import '../modules/login/bindings/login_binding.dart';
import '../modules/login/views/login_view.dart';
import '../modules/profile/OTA/bindings/ota_binding.dart';
import '../modules/profile/OTA/views/ota_view.dart';
import '../modules/profile/about/bindings/about_binding.dart';
import '../modules/profile/about/views/about_view.dart';
import '../modules/profile/bindings/profile_binding.dart';
import '../modules/profile/fontManager/bindings/font_manager_binding.dart';
import '../modules/profile/fontManager/views/font_manager_view.dart';
import '../modules/profile/transfer/bindings/transfer_binding.dart';
import '../modules/profile/transfer/views/transfer_view.dart';
import '../modules/profile/views/profile_view.dart';
import '../modules/register/bindings/register_binding.dart';
import '../modules/register/views/register_view.dart';
import '../modules/splash/bindings/splash_binding.dart';
import '../modules/splash/controllers/splash_controller.dart';
import '../modules/splash/views/splash_view.dart';
import '../modules/template/controllers/template_controller.dart';
import '../modules/template/edit_template/bindings/edit_template_binding.dart';
import '../modules/template/edit_template/views/edit_template_view.dart';
import '../modules/template/views/template_view.dart';
import '../modules/text_show/bindings/text_show_binding.dart';
import '../modules/text_show/views/text_show_view.dart';

part 'app_routes.dart';

class AppPages {
  AppPages._();

  static const INITIAL = Routes.SPLASH;

  static final routes = [
    GetPage(
      name: _Paths.HOME,
      page: () => const HomeView(),
      binding: HomeBinding(),
    ),
    GetPage(
      name: _Paths.CAST,
      page: () => const CastView(),
      binding: CastBinding(),
      children: [
        GetPage(
          name: _Paths.CHOOSE_LIST,
          page: () => const ChooseListView(),
          binding: ChooseListBinding(),
        ),
      ],
    ),
    GetPage(
      name: _Paths.DEVICE,
      page: () => const DeviceView(),
      binding: DeviceBinding(),
      children: [
        GetPage(
          name: _Paths.ADD_DEVICE,
          page: () => const AddDeviceView(),
          binding: AddDeviceBinding(),
        ),
      ],
    ),
    GetPage(
      name: _Paths.TEMPLATE,
      page: () => const TemplateView(),
      binding: BindingsBuilder(() {
        Get.create<TemplateController>(() => TemplateController());
      }),
      children: [
        GetPage(
          name: _Paths.EDIT_TEMPLATE,
          page: () => const EditTemplateView(),
          binding: EditTemplateBinding(),
        ),
      ],
    ),
    GetPage(
      name: _Paths.PROFILE,
      page: () => const ProfileView(),
      binding: ProfileBinding(),
      children: [
        GetPage(
          name: _Paths.ABOUT,
          page: () => const AboutView(),
          binding: AboutBinding(),
        ),
        GetPage(
          name: _Paths.TRANSFER,
          page: () => const TransferView(),
          binding: TransferBinding(),
        ),
        GetPage(
          name: _Paths.FONT_MANAGER,
          page: () => const FontManagerView(),
          binding: FontManagerBinding(),
        ),
        GetPage(
          name: _Paths.OTA,
          page: () => const OtaView(),
          binding: OtaBinding(),
        ),
      ],
    ),
    GetPage(
      name: _Paths.CAST_PROGRESS,
      page: () => const CastProgressView(),
      binding: CastProgressBinding(),
    ),
    GetPage(
      name: _Paths.CAST_RECORD,
      page: () => const CastRecordView(),
      binding: CastRecordBinding(),
      children: [
        GetPage(
          name: _Paths.CAST_RECORD_DETAIL,
          page: () => const CastRecordDetailView(),
          binding: CastRecordDetailBinding(),
        ),
      ],
    ),
    GetPage(
      name: _Paths.TEXT_SHOW,
      page: () => const TextShowView(),
      binding: TextShowBinding(),
    ),
    GetPage(
      name: _Paths.LOGIN,
      page: () => const LoginView(),
      binding: LoginBinding(),
    ),
    GetPage(
      name: _Paths.SPLASH,
      page: () => const SplashView(),
      binding: BindingsBuilder(() {
        Get.create<SplashController>(() => SplashController());
      }),
    ),
    GetPage(
      name: _Paths.EDIT_INFO,
      page: () => const EditInfoView(),
      binding: EditInfoBinding(),
    ),
    GetPage(
      name: _Paths.REGISTER,
      page: () => const RegisterView(),
      binding: RegisterBinding(),
    ),
  ];
}
